<?php
	header("Content-type:text/html;charset=utf-8");
//	$a = "123456";
//	$b = crypt($a,md5($a));
//	echo $b ;die;
		


	//打开SESSION
	session_start();
//echo $_SESSION['username'];die;

	date_default_timezone_set('PRC');
	//MCVk框架

	$m = isset($_GET['m'])?$_GET['m']:'home';

	$c = isset($_GET['c'])?$_GET['c']:'index';

	$v = isset($_GET['v'])?$_GET['v']:'index';



	define("M",$m);
	define("C",$c);
	define("V",$v);



	include("config/common.php");

	include("common/DB.php");

	require("common/function.php");
	//链接数据库
	$con = connect('localhost','root','','login');

	

	//顶级分类查找
	$cate =dbselect($con,'category','id,pid,category_name,url');
	$child = child($cate);

	$hid =isset($_GET['hid'])?$_GET['hid']:1;


	//联系方式
	$contact = dbselOne($con,'contact_us','*',1);

	assign('child',$child);



	
	include("application/".M."/controllers/".C."/".V.".php");
	

	assign('con',$con);



	if(C!='manage' && M=='admin'){
		display();
	}
	
	
?>
	